//
//  ShopBooksCell.m
//  PigMarket
//
//  Created by 张敬 on 2019/8/20.
//  Copyright © 2019年 pigmarket.oc. All rights reserved.
//

#import "ShopBooksCell.h"

@implementation ShopBooksCell

#pragma mark - lifecycle methods

- (void)setupUI
{
    self.accessoryType =  UITableViewCellAccessoryDisclosureIndicator;
    
    [self addSubview:self.titleLab];
    [self addSubview:self.redLab];
    [self addSubview:self.numberLab];
    [self addSubview:self.priceLab];
    [self addSubview:self.priceTipLab];
}

- (void)setupLayout
{
    {
        _titleLab.frame = CGRectMake(0, 0, 100, 22);
        [_titleLab sizeToFit];
        _titleLab.mj_x = 15;
        _titleLab.mj_y = 20;
    }
    
    {
        _redLab.size = CGSizeMake(80, 17);
        _redLab.mj_y = 25;
        _redLab.mj_x = _titleLab.right;
    }
    
    {
        _numberLab.size = CGSizeMake(150, 18);
        _numberLab.mj_x = _titleLab.mj_x;
        _numberLab.mj_y = _titleLab.bottom + 3;
    }
    
    {
        _priceLab.size = CGSizeMake(100, 25);
        _priceLab.mj_y = 20;
        _priceLab.mj_x = KScreenWidth - _priceLab.width - 5;
    }
    
    {
        _priceTipLab.frame = _priceLab.frame;
        _priceTipLab.mj_h = 18;
        _priceTipLab.mj_y = _priceLab.bottom + 1;
    }
}

#pragma mark - setter methods

/*
 @property (nonatomic, strong) NSNumber *goodsOrderId;
 @property (nonatomic, strong) NSNumber *goType;
 @property (nonatomic, strong) NSNumber *shopId;
 @property (nonatomic, strong) NSNumber *pigId;
 @property (nonatomic, strong) NSNumber *memberId;
 @property (nonatomic, copy) NSString *receiveAddress;
 @property (nonatomic, strong) NSNumber *payAmount;
 @property (nonatomic, copy) NSString *goNum;
 @property (nonatomic, copy) NSString *createTime;
 @property (nonatomic, copy) NSString *remark;
 @property (nonatomic, strong) NSNumber *goStatus;
 @property (nonatomic, copy) NSString *refundIf;
 @property (nonatomic, copy) NSString *payTime;
 @property (nonatomic, copy) NSString *sendTime;
 @property (nonatomic, copy) NSString *receiveTime;
 @property (nonatomic, copy) NSString *evaluateTime;
 @property (nonatomic, copy) NSString *cancelTime;
 @property (nonatomic, copy) NSString *payType;
 @property (nonatomic, copy) NSString *receiveName;
 @property (nonatomic, copy) NSString *receivePhone;
 @property (nonatomic, copy) NSString *addressTag;
 @property (nonatomic, strong) NSNumber *addressDefaultIf;
 @property (nonatomic, strong) NSNumber *orderClass;
 @property (nonatomic, copy) NSString *receiveRegion;
 @property (nonatomic, copy) NSString *cancelReason;
 @property (nonatomic, strong) NSNumber *showIf;
 */

- (void)setItem:(GoodsOrderList *)item{
    
    _titleLab.text = @"xxxx";
    
}


#pragma mark - getter methods

- (UILabel *)titleLab{
    
    if (!_titleLab) {
        _titleLab = [UILabel makeLabelWithText:@"" textColor:UIColorFromRGB(0x333333) font:mFont(17) textAliment:0];
    }
    return _titleLab;
}


- (UILabel *)redLab{
    
    if (!_redLab) {
        _redLab = [UILabel makeLabelWithText:@"（未出栏）" textColor:UIColorFromRGB(0xF1925D) font:mFont(12) textAliment:0];
    }
    return _redLab;
}


- (UILabel *)numberLab{
    
    if (!_numberLab) {
        _numberLab = [UILabel makeLabelWithText:@"猪编号：" textColor:UIColorFromRGB(0x999999) font:mFont(13) textAliment:0];
    }
    return _numberLab;
}


- (UILabel *)priceLab{
    
    if (!_priceLab) {
        _priceLab = [UILabel makeLabelWithText:@"1000.22" textColor:UIColorFromRGB(0x333333) font:mMediumFont(18) textAliment:0];
    }
    return _priceLab;
}


- (UILabel *)priceTipLab{
    
    if (!_priceTipLab) {
        _priceTipLab = [UILabel makeLabelWithText:@"总售价(元)" textColor:UIColorFromRGB(0x999999) font:mFont(13) textAliment:0];
    }
    return _priceTipLab;
}


@end
